/**
 *
 * @author ilya portnyagin iportnyagin@gmail.com
 */

package ru.portnyagin.helpdeskru.controller;

import java.io.Serializable;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.model.SelectItem;
import ru.portnyagin.helpdeskru.util.JsfUtil;

@ManagedBean(name = "userHDBean")
@SessionScoped
public class UserHDBean implements Serializable {

    @EJB
    private ru.portnyagin.helpdeskru.service.UserHDService userHDService;
    
    private SelectItem[] perfomer;
    private SelectItem[] customer;
    
    public UserHDBean() {
    }

    public SelectItem[] getSelectItemPerfomer() {
        if(perfomer == null) {
            perfomer = JsfUtil.getSelectItems(userHDService.findPerformer(), true);
        }
        return perfomer;
    }

  
    public SelectItem[] getSelectItemCustomer() {
        if(customer == null) {
            customer = JsfUtil.getSelectItems(userHDService.findCustomer(), true);
        }
        return customer;
    }

  

    
    
    
}


